const state = {
    msg: [

    ]
}

const mutations = {
    addMsg(state, newval) {
        state.msg.push(newval)
    }
}

const actions = {

}

const getters = {
    getMsg: (state) => (sid) => {
        // return state.msg.filter(item => item.sid === '111')
        return state.msg.filter(item => item.sid === sid)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
}
